﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ThinkGeo.MapSuite.Core;
namespace maptest.Common
{
    public class Constants
    {
        public const string POLYGON = "Polygon";
        public const string POLYLINE = "Line";
        public const string POINT = "Point";
        public class getStyle
        {
             public static GeoHatchStyle getstyleHatch(string id)
             {
                 GeoHatchStyle geoHatch=new GeoHatchStyle();
                 switch (id)
                 {
                     case "1": geoHatch=GeoHatchStyle.Cross;break;
                     case "2":geoHatch=GeoHatchStyle.LightDownwardDiagonal;break;
                     case "3":geoHatch=GeoHatchStyle.LightUpwardDiagonal;break;
                     case "4":geoHatch=GeoHatchStyle.DarkDownwardDiagonal;break;
                     case "5":geoHatch=GeoHatchStyle.DarkUpwardDiagonal;break;
                     case "6":geoHatch=GeoHatchStyle.WideDownwardDiagonal;break;
                     case "7":geoHatch=GeoHatchStyle.WideUpwardDiagonal;break;
                 }
                 return geoHatch;
             }
             public   static LineDashStyle getDashStyle(string id)
             {
                 LineDashStyle dashStyle=new LineDashStyle();
                 switch (id)
                 {
                     case "1":dashStyle=LineDashStyle.Dash;break;
                     case "2":dashStyle=LineDashStyle.Dot;break;
                     case "3":dashStyle=LineDashStyle.Solid;break;
                     case "4":dashStyle=LineDashStyle.DashDotDot;break;
                     case "5":dashStyle=LineDashStyle.DashDot;break;
                 }
                 return dashStyle;
             }
        }
        public class getScale
        {
            public static ApplyUntilZoomLevel getApplyZoomLevel(string id)
            {
                
                ApplyUntilZoomLevel zoomLevel = new ApplyUntilZoomLevel();
                switch (id)
                {
                    case "1":
                        zoomLevel = ApplyUntilZoomLevel.Level01;break;
                    case "2":
                        zoomLevel = ApplyUntilZoomLevel.Level02;break;
                    case "3":
                        zoomLevel = ApplyUntilZoomLevel.Level03; break;
                    case "4":
                        zoomLevel = ApplyUntilZoomLevel.Level04; break;
                    case "5":
                        zoomLevel = ApplyUntilZoomLevel.Level05; break;
                    case "6":
                        zoomLevel = ApplyUntilZoomLevel.Level06; break;
                    case "7":
                        zoomLevel = ApplyUntilZoomLevel.Level07; break;
                    case "8":
                        zoomLevel = ApplyUntilZoomLevel.Level08; break;
                    case "9":
                        zoomLevel = ApplyUntilZoomLevel.Level09; break;
                    case "10":
                        zoomLevel = ApplyUntilZoomLevel.Level10; break;
                    case "11":
                        zoomLevel = ApplyUntilZoomLevel.Level11; break;
                    case "12":
                        zoomLevel = ApplyUntilZoomLevel.Level12; break;
                    case "13":
                        zoomLevel = ApplyUntilZoomLevel.Level13; break;
                    case "14":
                        zoomLevel = ApplyUntilZoomLevel.Level14; break;
                    case "15":
                        zoomLevel = ApplyUntilZoomLevel.Level15; break;
                    case "16":
                        zoomLevel = ApplyUntilZoomLevel.Level16; break;
                    case "17":
                        zoomLevel = ApplyUntilZoomLevel.Level17; break;
                    case "18":
                        zoomLevel = ApplyUntilZoomLevel.Level18; break;
                    case "19":
                        zoomLevel = ApplyUntilZoomLevel.Level19; break;
                    case "20":
                        zoomLevel = ApplyUntilZoomLevel.Level20; break;

                }
                return zoomLevel;
            }

            public static ZoomLevel getZoomLevel(string id, MsSql2008FeatureLayer layer)
            {
                
                ZoomLevel zoomLevel = new ZoomLevel();
                switch (id)
                {
                    case "1":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel01; break;
                    case "2":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel02; break;
                    case "3":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel03; break;
                    case "4":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel04; break;
                    case "5":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel05; break;
                    case "6":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel06; break;
                    case "7":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel07; break;
                    case "8":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel08; break;
                    case "9":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel09; break;
                    case "10":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel10; break;
                    case "11":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel11; break;
                    case "12":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel12; break;
                    case "13":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel13; break;
                    case "14":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel14; break;
                    case "15":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel15; break;
                    case "16":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel16; break;
                    case "17":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel17; break;
                    case "18":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel18; break;
                    case "19":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel19; break;
                    case "20":
                        zoomLevel = layer.ZoomLevelSet.ZoomLevel20; break;

                }
                return zoomLevel;
            }
           

        }
    }
}